import { createRouter, createWebHistory } from 'vue-router'


const routes = [
  {
    path: '/',//缺省信息
    redirect:'login'
  },
  {
    path: '/login',//缺省信息
    component: () => import('../views/Login.vue'),
  },
  {
    path: '/layout',
    component: () => import('../components/Layout.vue'),
    children:[
      {
        path: '/Welcome',
        component: () => import('../views/Welcome.vue'),
      },
    ]
  },
  {
    path:'/layout',
    component: () => import('../components/Layout.vue'),
    children:[
      {
        path: '/Welcome',
        component: () => import('../views/Welcome.vue'),
        meta:{
          title: '首页'
        }
      },
      {
        path: '/insurance',
        children:[
          {
            path: '/insurancePolicy',
            component: () => import('../views/bus_insurance_policy.vue'),
            meta:{
              breadcrumb: '保单信息',
              title: '保单信息'
            }
          },
        ],
        meta:{
          breadcrumb: '保单管理',
        }
      },
      {
        path: '/claim',
        children:[
          {
            path: '/claimReport',
            component: () => import('../views/bus_claim_report.vue'),
            meta:{
              breadcrumb: '报案信息',
              title: '报案信息'
            }
          },
        ],
        meta:{
          breadcrumb: '报案管理',
        }
      },
      {
        path: '/dispatch',
        children:[
          {
            path: '/assign',
            component: () => import('../views/TaskAssignment.vue'),
            meta:{
              breadcrumb: '任务指派',
              title: '任务指派'
            }
          },
          {
            path: '/dispatch',
            component: () => import('../views/BusDispatchInfo.vue'),
            meta:{
              breadcrumb: '调度查询',
              title: '调度查询'
            }
          },
          {
            path: '/survey',
            component: () => import('../views/BusSurveyInfo.vue'),
            meta:{
              breadcrumb: '查勘信息',
              title: '查勘信息'
            }
          },
          // {
          //   path: '/dispatchInfo',
          //   component: () => import('../views/DispatchInfo.vue'),
          //   meta:{
          //     breadcrumb: '调度信息',
          //     title: '调度信息'
          //   }
          // },
        ],
        meta:{
          breadcrumb: '调度管理',
        }
      },
      {
        path: '/BusImages',
        children:[
          // {
          //   path: '/resourceSetup',
          //   component: () => import('../views/AreaManagement.vue'),
          //   meta:{
          //     breadcrumb: '数据监控',
          //     title: '数据监控'
          //   }
          // },
          {
            path: '/BusImages',
            component: () => import('../views/Bus_images.vue'),
            meta:{
              breadcrumb: '图片管理',
              title: '图片管理'
            }
          },
          {
            path: '/WorkingPersonnel',
            component: () => import('../views/WorkingPersonnel.vue'),
            meta:{
              breadcrumb: '员工信息',
              title: '员工信息'
            }
          },
        ],
        meta:{
          breadcrumb: '企业管理',
        }
      },
      {
        path: '/BusinessManagement',
        children:[
          // {
          //   path: '/resourceSetup',
          //   component: () => import('../views/AreaManagement.vue'),
          //   meta:{
          //     breadcrumb: '数据监控',
          //     title: '数据监控'
          //   }
          // },
          {
            path: '/BusinessMessage',
            component: () => import('../views/BusinessMessage.vue'),
            meta:{
              breadcrumb: '企业信息',
              title: '企业信息'
            }
          },
          {
            path: '/WorkingPersonnel',
            component: () => import('../views/WorkingPersonnel.vue'),
            meta:{
              breadcrumb: '员工信息',
              title: '员工信息'
            }
          },
        ],
        meta:{
          breadcrumb: '企业管理',
        }
      },
      {
        path: '/system',
        children:[
          // {
          //   path: '/resourceSetup',
          //   component: () => import('../views/AreaManagement.vue'),
          //   meta:{
          //     breadcrumb: '数据监控',
          //     title: '数据监控'
          //   }
          // },
          {
            path: '/AreaManagement',
            component: () => import('../views/AreaManagement.vue'),
            meta:{
              breadcrumb: '省市同步',
              title: '省市同步'
            }
          },
        ],
        meta:{
          breadcrumb: '系统管理',
        }
      },
    ]
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
